package com.tencent.iov.cowin.befsale.clue.value.enums;


import com.software.boot.common.util.EmptyUtils;
import lombok.Getter;

/**
 * @Describe: 应用类型枚举
 * @Author: Jason.wang
 * @Date: 2021/4/15 10:08
 */
public enum AgentTypeEnum {

    ADDRESS_BOOK("address_book", "通讯录同步助手"),
    CORP_BOOK("corp_book", "企微通讯录"),
    CHAT_CENTER("chat_center", "成员中心"),
    EXTERNAL_CONTACT("external_contact", "外部联系人"),
    EMPLOYEE_CARD("employee_card", "个人名片"),
    TALK_LIBRARY("talk_library", "话术库"),
    MATERIAL_LIBRARY("material_library", "素材库"),
    SCHEDULE_MANAGER("schedule_manager", "日程管理"),
    RESIGN_INHERIT("resign_inherit", "离职继承"),
    DAILY_STATIC("daily_static", "日排行榜"),
    CUSTOMER_MANAGER("customer_manager", "客户管理"),
    INTENT_MODEL("intent_model", "意向车型"),
    DEVELOP_CARD("develop_card", "开拓建卡"),
    CUSTOMER_STATIC("customer_static", "客户统计"),
    CUSTOMER_VIEW("customer_view", "客户视图"),
    INFO_PERFECT("info_perfect", "信息完善"),
    MAKE_POSTER("make_poster", "自制海报"),
    MESSAGE_CENTER("message_center", "消息中心"),
    TODO_MANAGER("todo_manager", "待办管理"),
    CLUB_MANAGER("club_manager", "线索管理"),
    CUSTOMER_SERVICE("customer_service", "客服入口"),
    SEAT_ENTRANCE("seat_entrance", "坐席入口"),
    ANNC_CENTER("annc_center", "公告中心"),
    QUES_CENTER("ques_center", "问卷中心"),
    QUES_MANAGER("ques_manager", "问卷管理"),
    EMPLOYEE_CENTER("employee_center", "成员中心"),
    MANAGEMENT_CENTER("management_center", "管理中心"),
    OPPTY_CUSTOMER_MANAGEMENT("oppty_customer_management", "商机客户管理"),
    OPPTY_REPORT_MANAGEMENT("oppty_report_management", "商机报表管理"),
    OPPTY_BACKEND_MANAGEMENT("oppty_backend_management", "商机后台管理"),
    OPPTY_FOLLOW_MANAGEMENT("oppty_follow_management", "客户跟进管理"),
    CUSTOMER_LIST_MANAGEMENT("customer_list_management", "客户列表管理"),
    LABEL_MANAGEMENT("label_management", "标签管理"),
    OPT_CUSTOMER_SOP_MANAGEMENT("opt_customer_sop_management", "运营客户SOP管理"),
    CUSTOMER_SOP("customer_sop", "客户SOP"),
    OPT_DEALER_LC_MANAGEMENT("opt_dealer_lc_management", "运营门店活码管理");

    @Getter
    private final String code;
    @Getter
    private final String msg;


    AgentTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static boolean contains(AgentTypeEnum agentTypeEnum) {
        if (EmptyUtils.isNotEmpty(agentTypeEnum)) {
            for (AgentTypeEnum typeEnum : AgentTypeEnum.values()) {
                if (typeEnum.getCode().equals(agentTypeEnum.getCode())) {
                    return true;
                }
            }
        }
        return false;
    }

    public static AgentTypeEnum getEnumByCode(String code) {
        if (EmptyUtils.isEmpty(code)) {
            return null;
        }
        for (AgentTypeEnum typeEnum : AgentTypeEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }


}
